﻿using Common.View.Base;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Common.Device.ViewModels
{
    public class CaiJiMoKuaiViewModel:BindableBase
    {
        private int menuIndex = 0;
        /// <summary>
        /// 菜单索引
        /// </summary>
        public int MenuIndex
        {
            get { return menuIndex; }
            set { SetProperty(ref menuIndex, value); }
        }
        private ObservableCollection<string> channels = new ObservableCollection<string>() {  };
        /// <summary>
        /// 所支持的通道
        /// </summary>
        public ObservableCollection<string> Channels
        {
            get { return channels; }
            set { SetProperty(ref channels, value); }
        }
        private string channel = null;
        /// <summary>
        /// 通道
        /// </summary>
        public string Channel
        {
            get { return channel; }
            set
            {
                SetProperty(ref channel, value);
                if (channel == "温度")
                {
                    Unit = "℃";
                }
                if (channel == "湿度")
                {
                    Unit = "%RH";
                }
            }
        }
        private string unit;
        /// <summary>
        /// 单位
        /// </summary>
        public string Unit
        {
            get { return unit; }
            set { SetProperty(ref unit, value); }
        }
        private string min = null;
        /// <summary>
        /// 下限值
        /// </summary>
        public string Min
        {
            get { return min; }
            set { SetProperty(ref min, value); }
        }
        private string max = null;
        /// <summary>
        /// 上限值
        /// </summary>
        public string Max
        {
            get { return max; }
            set { SetProperty(ref max, value); }
        }
    }
}
